FIND_PATH(LIBVLC_INCLUDE_DIR vlc/vlc.h)
FIND_LIBRARY(LIBVLC_LIBRARY NAMES libvlc)
FIND_LIBRARY(LIBVLC_CORE_LIBRARY NAMES libvlccore)

IF(LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY)
    SET(EXTERNAL_INCLUDE_DIR ${LIBVLC_INCLUDE_DIR})
    SET(EXTERNAL_LIBRARIES ${LIBVLC_LIBRARY} ${LIBVLC_CORE_LIBRARY})
    
    SET(EXAMPLE_NAME osgvlc)
    SET(EXAMPLE_FILES osgvlc.cpp VideoPlayer.cpp)
    START_EXAMPLE()
    SET_TARGET_PROPERTIES(${EXAMPLE_NAME} PROPERTIES LINK_FLAGS "/OPT:NOREF")  # Must here for using libVLC under Windows
ENDIF(LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY)
